//
//  CollectCell.m
//  FloatClouds
//
//  Created by 黄威 on 16/9/20.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import "CollectCell.h"
#import "Masonry.h"
@implementation CollectCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.imageViewLift  = [[UIImageView alloc]init];
        self.imageViewLift.layer.masksToBounds = YES;
        self.imageViewLift.layer.cornerRadius = 5;
        [self.contentView addSubview:self.imageViewLift];
        //  self.imageViewLift.backgroundColor = [UIColor redColor];
        
        self.name = [[BaseLabel alloc]init];
        self.name.font = [UIFont fontWithName:@"Helvetica" size:19];
        self.name.numberOfLines = 1;
        [self.contentView addSubview:self.name];
        
        
        self.catrame = [[BaseLabel alloc]init];
        self.catrame.text = @"综合评分";
        self.catrame.font = [UIFont fontWithName:@"Helvetica" size:15];
        self.catrame.tintColor = [UIColor grayColor];
        [self.contentView addSubview:self.catrame];
        
        self.catrameinput = [[BaseLabel alloc]init];
        self.catrameinput.font = [UIFont fontWithName:@"Helvetica" size:15];
        [self.contentView addSubview:self.catrameinput];
        
        
        
        self.price = [[BaseLabel alloc]init];
        self.price.text = @"参考价格";
        self.price.font = [UIFont fontWithName:@"Helvetica" size:15];
        [self.contentView addSubview:self.price];
        
        
        self.priceinput = [[BaseLabel alloc]init];
        self.priceinput.font = [UIFont fontWithName:@"Helvetica" size:15];
        [self.contentView addSubview:self.priceinput];
        
        
    }
    
    return self;
    
}

- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    [self.imageViewLift mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(self.mas_width).multipliedBy(0.3);
        make.top.left.mas_equalTo(5);
        make.bottom.mas_equalTo(-5);
        
    }];
    
    [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(5);
        make.left.mas_equalTo(self.imageViewLift.mas_right).mas_equalTo(20);
        make.width.mas_equalTo(self.mas_width).multipliedBy(0.5);
        make.height.mas_equalTo(self.mas_height).multipliedBy(0.3);
    }];
    
    [self.catrame mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.name.mas_bottom).mas_equalTo(5);
        make.left.mas_equalTo(self.imageViewLift.mas_right).mas_equalTo(20);
        make.width.mas_equalTo(self.mas_width).multipliedBy(0.3);
        make.height.mas_equalTo(self.mas_height).multipliedBy(0.2);
    }];
    
    [self.catrameinput mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.name.mas_bottom).mas_equalTo(5);
        make.left.mas_equalTo(self.catrame.mas_right).mas_equalTo(20);
        make.width.mas_equalTo(self.mas_width).multipliedBy(0.2);
        make.height.mas_equalTo(self.mas_height).multipliedBy(0.2);
    }];
    
    [self.price mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.catrame.mas_bottom).mas_equalTo(5);
        make.trailing.mas_equalTo(self.catrame);
        make.width.mas_equalTo(self.mas_width).multipliedBy(0.3);
        make.height.mas_equalTo(self.mas_height).multipliedBy(0.2);
        
    }];
    
    [self.priceinput mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(self.mas_width).multipliedBy(0.2);
        make.height.mas_equalTo(self.mas_height).multipliedBy(0.2);
        make.top.mas_equalTo(self.catrame.mas_bottom).mas_equalTo(5);
        make.trailing.mas_equalTo(self.catrameinput);
    }];
    
}

-(void)setChecked:(BOOL *)checked{






}

@end
